package playGround;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import playGround.border.Border;
import playGround.border.Door;
import playGround.border.Wall;
import playGround.dungeon.Direction;
import playGround.dungeon.Dungeon;
import playGround.dungeon.Position;
import playGround.square.Scale;
import playGround.square.Square;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Border wall1 = new Wall(false);
		Border wall2 = new Wall(false);
		Border wall3 = new Wall(false);
		Border wall4 = new Wall(false);
		Border wall5 = new Wall(false);
		Border wall6 = new Wall(false);
		Border wall7 = new Wall(false);
		Border wall8 = new Wall(false);
		Border wall9 = new Wall(false);
		Border wall10 = new Wall(false);
		Border wall11 = new Wall(false);
		Border wall12 = new Wall(false);
		Border door1 = new Door();
		Border door2 = new Door();
		Map<Direction, Border> bordersSquare1 = new HashMap<Direction, Border>();
		Map<Direction, Border> bordersSquare2 = new HashMap<Direction, Border>();
		Map<Direction, Border> bordersSquare3 = new HashMap<Direction, Border>();
		Map<Direction, Border> bordersSquare4 = new HashMap<Direction, Border>();
		Map<Direction, Border> bordersSquare5 = new HashMap<Direction, Border>();
		bordersSquare1.put(Direction.NORTH,wall1);
		bordersSquare2.put(Direction.NORTH,wall2);
		bordersSquare1.put(Direction.WEST,wall3);
		bordersSquare1.put(Direction.EAST,wall4);
		bordersSquare2.put(Direction.WEST,wall5);
		bordersSquare2.put(Direction.SOUTH, wall6);
		bordersSquare3.put(Direction.WEST, wall7);
		bordersSquare3.put(Direction.SOUTH, wall8);
		bordersSquare3.put(Direction.EAST, door1);
		bordersSquare4.put(Direction.WEST, door2);
		bordersSquare4.put(Direction.NORTH, wall9);
		bordersSquare4.put(Direction.EAST, wall10);
		bordersSquare5.put(Direction.WEST, wall11);
		bordersSquare5.put(Direction.EAST, wall12);
		Square square1 = new Square(100,new BigDecimal(50),Scale.CELCIUS,bordersSquare1);
		Square square2= new Square(90,new BigDecimal(25),Scale.CELCIUS,bordersSquare2);
		Square square3= new Square(100,new BigDecimal(50),Scale.CELCIUS,bordersSquare3);
		Square square4= new Square(-30,new BigDecimal(70),Scale.CELCIUS,bordersSquare4);
		Square square5= new Square(-30,new BigDecimal(50),Scale.CELCIUS,bordersSquare5);
		Position maxPosition = new Position(20,20,20);
		Dungeon dungeon = new Dungeon(maxPosition);
		Position position1 = new Position(0,10,0);
		Position position3 = new Position(0,11,0);
		Position position2 = new Position(1,10,0);
		Position position4 = new Position(1,11,0);
		Position position5 = new Position(1,12,0);
		dungeon.addSquare(position1, square1);
		dungeon.addSquare(position2, square2);
		dungeon.addSquare(position3, square3);
		dungeon.addSquare(position4, square4);
		dungeon.addSquare(position5, square5);
		System.out.println(square1.getTemperature());
		System.out.println(square1.getHumidity());
		System.out.println(square1.getNbSquaresOfArea());
		System.out.println(" ");
		square3.getBorder(Direction.EAST).openOrClose();
		System.out.println(square1.getTemperature());
		System.out.println(square1.getHumidity());
		System.out.println(square1.getNbSquaresOfArea());
		System.out.println(" ");
		System.out.println(square2.getTemperature());
		System.out.println(square3.getTemperature());
		System.out.println(square4.getTemperature());
		System.out.println(square5.getTemperature());

	}

}
 